#ifndef CAMERAWIDGET_H
#define CAMERAWIDGET_H

#include <QWidget>
#include <QPropertyAnimation>
#include <QPushButton>
#include "AbstractLayer/Camera/abstractcamera.h"
#include "UserLayer/GUI/CameraWidget/camera.h"
namespace Ui {
class CameraWidget;
}

class CameraWidget : public QWidget
{
    Q_OBJECT

public:
    explicit CameraWidget(QWidget *parent = nullptr);
    ~CameraWidget();

private slots:
    void on_btn_videomode_clicked();

    void on_btn_photomode_clicked();

    void on_btn_startstop_clicked();

    void recvCameraImg(QImage);
    void on_comboBox_currentIndexChanged(const int index);

    void on_btn_recapture_clicked();

    void on_btn_cancel_clicked();

    void on_btn_send_clicked();

signals:
    void sendCameraPhoto(QImage);
private:
    Ui::CameraWidget *ui;
    QPushButton* nowbtn;
    QPropertyAnimation *anim,*anim2;
    AbstractCamera *camera;
    QImage image;
};

#endif // CAMERAWIDGET_H
